<%@page contentType="text/html;charset=UTF-8"  language="java"%>
<html>
<head>
<title>Insert title here</title>
<script type="text/javascript" src="jquery-3.5.1.min.js"></script>
<script>
	$(function(){
		$("button").click(function(){
			var url = "GetTicket";
			$.get(url,function(ticket){
				var src="https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=" + ticket;
				$("img").attr("src",src);
			});
			
		});
		
	});

</script>
</head>
<body>
	<button>生成二维码</button>
	<img alt="" src="">
</body>
</html>